<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .reveal-modal-bg {
            position: fixed;
            height: 100%;
            width: 100%;
            z-index: 100;
            display: none;
            top: 0;
            left: 0;
            background: rgba(00, 00, 00, 0.8);
        }
        .reveal-modal {
            visibility: hidden;
            top: 150px;
            left: 50%;
            margin-left: -200px;
            width: 320px;
            position: absolute;
            z-index: 101;
            padding: 30px 40px 34px;
            -moz-border-radius: 5px;
            -webkit-border-radius: 5px;
            border-radius: 5px;
            -moz-box-shadow: 0 0 10px rgba(0,0,0,.4);
            -webkit-box-shadow: 0 0 10px rgba(0,0,0,.4);
            -box-shadow: 0 0 10px rgba(0,0,0,.4);
            background-color: #FFF;
        }
        h1 {
            display: block;
            font-size: 2em;
            margin-block-start: 0.67em;
            margin-block-end: 0.67em;
            margin-inline-start: 0px;
            margin-inline-end: 0px;
            font-weight: bold;
        }
        .reveal-modal .close-reveal-modal {
            font-size: 22px;
            line-height: 0.5;
            position: absolute;
            top: 8px;
            right: 11px;
            color: #333;
            text-shadow: 0 -1px 1px rbga(0,0,0,.6);
            font-weight: bold;
            cursor: pointer;
        }
    </style>
</head>
<body>
<div class="reveal-modal-bg" style="display: block; cursor: pointer;"></div>
<div id="myModal" class="reveal-modal" style="opacity: 1; visibility: visible; top: 150px;">
    <p>{$msg}</p>
    <a class="close-reveal-modal" id="close">×</a>
</div>
</body>
</html>
<script>
    document.getElementById('close').onclick = function () {
        var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);
    }
</script>